#include "LED/led.h"
#include "UART/uart.h"
#include "PLL/pll.h"
#include "PRINT/my_printf.h"
#include "TEST/test.h"

int g_a;

void delay(uint t){
    while(t--);
}

void test(){
    float tmpf;

    tmpf = (10000000 / (16.0 * 115200));
    printf("I: %d\r\n", (int)tmpf);
    tmpf = tmpf - (int)tmpf;    // 小数部分
    printf("F: %d\r\n", (int)(tmpf * 2 * 32 + 0.5));
}

int main(){
    char ch;
    int i;
    // static int s_a = 10;

    // chg_pll();
    // while((PWRMODE >> 15) & 1);

    led_init();

    print_cpsr();

    // test();

    // print_PLL();

    while(1){
        ch = my_getc();
        my_putc(ch);
        if(ch == '\r'){
            my_putc('\n');
        }
        
    }

    return 0;
}
